import { Button, Dialog } from '@alifd/next';
import React from 'react';
import ReactDOM from 'react-dom';
class Demo extends React.Component {
    state = {
        visible: false
    };
    onOpen = () => {
        console.log('初始化 open了')
        this.setState({
            visible: true
        });
        this.props.onOpen('hellow');
        // this.$emit("onOpen")
    };
    onClose = () => {
        this.setState({
            visible: false
        });
    };
    render() {
        return (
            <div>
                <Dialog
                    title="Welcome to Alibaba.com"
                    visible={this.state.visible}
                    autoFocus
                    onOk={this.onClose.bind(this, 'okClick')}
                    onCancel={this.onClose.bind(this, 'cancelClick')}
                    onClose={this.onClose}
                    cancelProps={{'aria-label':'cancel'}}
                    okProps={{'aria-label':'ok'}}>
                    <p tabIndex="0">  Start your business here by searching a popular product</p>
                </Dialog>
            </div>
        );
    }
}
export default Demo;